<?php
	function stripSpeechMarks( $text ) {
		// First, replace UTF-8 characters.
		$text = str_replace(
		 array("\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c", "\xe2\x80\x9d", "\xe2\x80\x93", "\xe2\x80\x94", "\xe2\x80\xa6"),
		 array("'", "'", '"', '"', '-', '--', '...'),
		 $text);
		// Next, replace their Windows-1252 equivalents.
		 $text = str_replace(
		 array(chr(233), chr(163), chr(34), chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),
		 array('&#233;', '&#163;', '&#34;', "&#145;", "&#146;", '&#147;', '&#148;', '-', '--', '...'),$text);
		
		return $text;	
	}
	function replaceSpeechMarks( $text ) {
		// First, replace UTF-8 characters.
		$text = str_replace(
		 array("\xe2\x80\x98", "\xe2\x80\x99", "\xe2\x80\x9c", "\xe2\x80\x9d", "\xe2\x80\x93", "\xe2\x80\x94", "\xe2\x80\xa6"),
		 array("'", "'", '"', '"', '-', '--', '...'),
		 $text);
		// Next, replace their Windows-1252 equivalents.
		 $text = str_replace(
		 array(chr(233), chr(163), chr(34), chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133)),
		 array('&#233;', '&#163;', '&#34;', "&#145;", "&#146;", '&#147;', '&#148;', '-', '--', '...'),$text);
		
		return $text;	
	}
?>